<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="sf" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>


<html>
<head>
    <title>登录界面</title>
    <style type="text/css">
        div.errors{
            color:red;
        }

        input.errors{
            background-color: red;
        }
    </style>
   <%-- <script >
        var mercury = '${register}';
        alert(mercury);
    </script>--%>
</head>
<body>
    <sf:form method="post" action="/springmvc/userView/register" commandName="user">
    <sf:errors path="*" cssClass="errors" element="div"/>
    <sf:label path="userName">用户名：</sf:label><sf:input path="userName" cssErrorClass="errors"/><br/>
        <%--<sf:label path="birthday">出生日期：</sf:label><sf:input path="birthday"/><br/>--%>
    <input type="submit" value="注册"/>
    </sf:form>

    <%--1.message--%>
    <s:message code="welcome.words"></s:message>

    <%--2.url--%>
    <a href="<s:url value="/userView/register" />">111</a> <br/>

    <s:url value="/userView/register/{userName}" var="register" javaScriptEscape="true"  > <%--htmlEscape--%>
        <s:param name="userName" value="mercury" />
        <s:param name="age" value="11" />
        <s:param name="birghdat" value="121" />
    </s:url>
    <span>${register}</span>
    <a href="${register}">222</a><br/>


    <%-- 3.escapeBody--%>
    <s:escapeBody htmlEscape="true"><h1>嘻嘻嘻</h1></s:escapeBody>
</body>
</html>
